package com.qfmy.model.query.user;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 清风明月
 * @Package com.qfmy.model.query
 * @date 2025/11/11
 * @description 用户登入
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuppressWarnings("all")
public class UserQuery {

    @Schema(description = "用户手机号")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确（需为11位有效数字，以13/14/15/16/17/18/19开头）")
    private String phone;

    @Schema(description = "用户密码")
    @Pattern(regexp = "^[a-zA-Z0-9]{6,20}$", message = "密码格式不正确（需为6-20位字母、数字组合）")
    private String password;

    @Schema(description = "短信验证码")
    @Pattern(regexp = "^\\d{4}$", message = "验证码格式不正确（需为4位数字）")
    private String code;

    @Schema(description = "设备id")
    private String deviceId;

    @Schema(description = "设备类型")
    private Integer deviceType;

    @Schema(description = "用户的ip")
    private String ip;

    @Schema(description = "邀请码")
    private String inviteCode;

}
